{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=67
  Verdict: Accepted
}
var
	i,n,x,y:longint;
	f:boolean;
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n,x);
f:=false;
for i:=2 to n do begin
	read(y);
	if x*y>0 then begin
		f:=true;
		break;
	end;
	x:=y;
end;
if f then write('YES') else write('NO');
end.